using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Runtime.Serialization;

namespace KPIS.GERP.Models.BGM
{
	[Table("bgm_project_activity_plan_target"), DataContract]
    public class ProjectActivityPlanTarget
    {
		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Display(Name = "BgmProjActPlanTargetId", ResourceType = typeof(Resources.ProjectActivityPlanTargetResource))]
        [Column("bgm_proj_act_plan_target_seq", TypeName="int")]
        public int ProjActPlanTargetId { get; set; }

        [ForeignKey("ProjectActivityPlan")]
		[DataMember, Display(Name = "BgmProjActPlanId", ResourceType = typeof(Resources.ProjectActivityPlanTargetResource))]
        [Column("bgm_proj_act_plan_seq", TypeName="int")]
        public Nullable<int> ProjActPlanId { get; set; }

		[DataMember, Display(Name = "Target", ResourceType = typeof(Resources.ProjectActivityPlanTargetResource))]
		[Column("target", TypeName="ntext")]
        public string Target { get; set; }

		[DataMember, Display(Name = "StartMonth", ResourceType = typeof(Resources.ProjectActivityPlanTargetResource))]
		[Column("start_month", TypeName="int")]
        public Nullable<int> StartMonth { get; set; }

		[DataMember, Display(Name = "EndMonth", ResourceType = typeof(Resources.ProjectActivityPlanTargetResource))]
		[Column("end_month", TypeName="int")]
        public Nullable<int> EndMonth { get; set; }

        [DataMember]
        public virtual ProjectActivityPlan ProjectActivityPlan { get; set; }



        #region RecordStatus

        [DataMember, Display(Name = "RecordStatus", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("record_status", TypeName="ntext")]
        public string RecordStatus { get; set; }

        [DataMember, Display(Name = "CreatedBy", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("created_by", TypeName="int")]
        public Nullable<int> CreatedBy { get; set; }

        [DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("created_when", TypeName="datetime2")]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

        [DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("updated_by", TypeName="int")]
        public Nullable<int> UpdatedBy { get; set; }

        [DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("updated_when", TypeName="datetime2")]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }

        #endregion

    }
}